home *** CD-ROM | disk | FTP | other *** search
- Path: news.halcyon.com!usenet
- From: normanb@halcyon.com (Norm Bryar)
- Newsgroups: comp.lang.c++
- Subject: Re: visual c++: #undef
- Date: Thu, 15 Feb 1996 17:28:03 GMT
- Organization: Northwest Nexus Inc.
- Message-ID: <4fvqe2$l27@news.halcyon.com>
- References: <DMsrJE.7GI@info.uucp>
- NNTP-Posting-Host: blv-pm10-ip5.halcyon.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- body2872@mach1.wlu.ca (robert body 9308 u) wrote:
-
-
- >my #undefs cause Visual C++ (2.2) to give warnings, yet it fine in
- >Borland C++
-
-
- >i use it inside the function with first
- >#define LA
- >..code
- >#undef LA
-
- >or with #define and #undef between functions, and i always the warning
- >that
- >"unexpected characters following #undef; newline expected"
- >but there are no unexpected characters there, just
- >eg. #undef ROWCOL(i)
-
-
- >--
- >body2872@mach1.wlu.ca
-
- The macro name is all you need to supply to undef;
- the argument list is, indeed, superfluous.
-
- #define ARRAYDIM(a) (sizeof(a)/sizeof(a[0]))
-
- func()
- {
- ...
- }
-
- #undef ARRAYDIM
-
- --Norm
-
-
-
-